<?php

namespace App\Observers;

use App\Helpers\KeyHandler;
use App\Models\Option;
use Illuminate\Support\Facades\Cache;

class OptionObserver
{

    public function created(Option $option)
    {
        Cache::forget(sprintf(KeyHandler::OPTION, $option->type));
    }


    public function deleted(Option $option)
    {
        Cache::forget(sprintf(KeyHandler::OPTION, $option->type));
    }
}
